#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include<QPainter>
#include<QDebug>
#include <QMainWindow>
#include<QTimer>
#include"mytank.h"
#include"maps.h"
#include"enemytank.h"
#include"buff.h"
QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT
public slots:
void result();
    void map_update();
public:
    buff mybuff;
    enemytank* enemy;
    mytank *myt;
    bool is_start=false;
    bool start=false;
    bool drawmap=false;
    QTimer*timer;
    void initmap();
    void keyReleaseEvent(QKeyEvent *ev);
    void keyPressEvent(QKeyEvent *key);
    void paintEvent(QPaintEvent*event);
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();
private:
    Ui::MainWindow *ui;
signals:
    void gameover();

};
#endif
